package com.example.demo.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demo.entity.Resource;
import com.example.demo.entity.Role;
import com.example.demo.entity.User;
import com.example.demo.mapper.UserMapper;
import com.example.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public User login(String username) {
        return userMapper.login(username);
    }

    @Override
    public List<String> selectRoleByUserId(User user) {
        return userMapper.selectRoleByUserId(user);
    }

    @Override
    public List<String> selectRoleResByUserId(User user) {
        return userMapper.selectRoleResByUserId(user);
    }
}
